# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
import time,json,requests,threading


mg = webdriver.Firefox()
mg.get('https://www.mgtv.com/')


mobile=18573122260


mgtv=mg.find_element(By.CSS_SELECTOR,".g-page-channel .m-agreement-content .btn .allow")
mgtv.click()
mgtv=mg.find_element(By.CSS_SELECTOR,".rightnav.rightnav-nav1 .list .user a")
mgtv.click()
mgtv=mg.find_element(By.CSS_SELECTOR,".sms-login.account .hitv-input.is-round.account-input.zIndex .prepend.prefix")
mgtv.send_keys(mobile)
time.sleep(10)
while(True):
	mgtv=mg.find_element(By.CSS_SELECTOR,".send-code")
	mgtv.click()
	time.sleep(60)	